<?php
include_once("model/Model.php");

class Controller {
	public $model;
	
	public function __construct()  
    {  
       // $this->model = new Model();

    } 
	
	public function invoke()
	{
		/*if (!isset($_GET['book']))
		{
			// no special book is requested, we'll show a list of all available books
			$books = $this->model->getBookList();
			include 'view/booklist.php';
		}
		else
		{
			// show the requested book
			$book = $this->model->getBook($_GET['book']);
			include 'view/viewbook.php';
		}*/
		// Hien thi sp theo danh muc
		if(isset($_GET['idmnl']))
		{
			include 'view/Catalogue_Product.php';
			return;	
		}
		// Hien thi chi tiet sp
		if(isset($_GET['idsp']))
		{
			include 'view/Detail_Product.php';	
			return;	
		}
		// Hien thi sp khuyen mai
		if( isset($_GET['idmn']) && (isset($_GET['idmn']) && $_GET['idmn']==1))
		{
			include 'view/SaleOff_Product.php';
			return;
		}
		// Hien thi sp moi
		if( isset($_GET['idmn']) && (isset($_GET['idmn']) && $_GET['idmn']==2))
		{
			include 'view/New_Product.php';
			return;
		}
		// Hien thi sphot
		if( isset($_GET['idmn']) &&(isset($_GET['idmn']) && $_GET['idmn']==3))
		{
			include 'view/Hot_Product.php';
			return;
		}
		if( isset($_GET['idmn']) &&(isset($_GET['idmn']) && $_GET['idmn']==4))
		{
			include 'view/Contact_Info.php';
			return;
		}
		include 'view/New_Product.php';
	
		
	}
}

?>